<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>每日一读 - 爱读书</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <script lang="javascript" type="text/javascript"
            th:src="@{https://libs.baidu.com/jquery/1.11.3/jquery.min.js}"></script>
    <link rel="stylesheet" th:href="@{/css/core.min-20160809.css}">
    <link rel="stylesheet" th:href="@{/css/dushu.min-20160802.css}">
    <link rel="stylesheet" th:href="@{/css/font_1468833227_139596.css}">
    <meta name="description" content="爱读书每日一读：">
    <script>
        /*判断是否要显示登陆注册*/
        var test = window.location.href;
        $(function () {
            if ($('.float-right').find("a:eq(0)").text() == '欢迎回来') {
                $(".float-right").find("a:eq(0)").attr("href", "javascript:;");
                $(".float-right").find("a:eq(1)").attr("href", "javascript:;");
            }
            let content = $(".content-read").text();
            let contents = content.split('##');
            /*拼接内容*/
            let str = "";
            for (let i = 0 ; i< contents.length;i++){
                str += "<p>"+contents[i]+"</p>";
            }
            $(".text").empty();
            $(".text").append(str);
        });

        $(function () {
            let span = $(".span24 a");
            for (let s = 0 ;s<span.length;s++){
                $(span[s]).css("border-color","#5c5050");
            }
            if (test.indexOf("index/toRead")){
                $("#ctl00_c1_nav_meiwen").find("a:eq(0)").css("border-color","#d47e74");
                $("#ctl00_c1_nav_meiwen").find("a:eq(0)").css("color","#d47e74");
            }
        });
    </script>
</head>
<body>
<!--实现登录注册-->
<div class="layout bg border-bottom">
    <div class="container height-big text-gray">
        <span class="float-right">
            <a th:href="@{/index/toLogin}" th:text="${session.user}==null?'注册':'欢迎回来'" class="text-gray"></a>
            <span class="text-little">|</span>
            <a th:href="@{/index/toLogin}" class="text-gray" th:text="${session.user}==null?'登陆':${session.user.phone}"></a>
        </span>读书好，好读书，读好书！
    </div>
</div>
<!--可下拉式导航栏-->
<div class="layout bg border-bottom fixed-top hidden" style="z-index: 99;" id="fixednav">
    <div class="container">
        <div class="row">
            <div class="span4">
                <a href="javascript:;" title="读书网">
                    <img th:src="@{/picture/login1.png}" alt="爱读书"></a></div>
            <div class="span13">
                <ul class="nav nav-inline nav-menu padding-top">
                    <li><a href="/index/toRead" >每日一读</a></li>
                    <li><a th:href="@{/index/toNovel/1}" >小说作品</a></li>
                    <li><a th:href="@{/index/toNovel/2}" >经济管理</a></li>
                    <li><a th:href="@{/index/toNovel/3}">历史传记</a></li>
                    <li><a th:href="@{/index/toNovel/4}">生活艺术</a></li>
                    <li><a th:href="@{/index/toNovel/5}" >文学艺术</a></li>
                    <li><a th:href="@{/index/toNovel/6}" >社会科学</a></li>
                    <li><a th:href="@{/index/toNovel/7}" >成功励志</a></li>
                </ul>
            </div>

            <!--轮播图的搜索框-->
            <div class="span7 text-right">
                <form name="searchform" th:action="@{/index/toSearch}" >
                    <div class="input-group padding-small-top">
                        <input type="text" class="wd input border-main" name="name" required="required" value="" autocomplete="off" size="30"
                               placeholder="搜索海量图书/电子书/网络小说">
                        <span class="addbtn"><button class="button bg-main"><span
                                class="icon-search"></span></button></span>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


<!--首页  top-->
<div class="container">
    <div class="row">
        <div class="span8"><a href="javascript:;" title="爱读书"><img th:src="@{/picture/login2.png}"
                                                                   alt="爱读书"></a></div>

        <!--搜索框，通过form表单实现 -->
        <div class="span10 padding-big-top">
            <form name="searchform" th:action="@{/index/toSearch}" >
                <div class="input-group padding-little-top margin-big-right">
                    <input type="text" name="name" class="wd input input-big border-main" required="required" value="" size="30"
                           placeholder="搜索海量图书">
                    <span class="addbtn"><button class="button button-big bg-main" id="search_button"><span
                            class="icon-search text-large"></span></button></span>
                </div>
            </form>
        </div>

        <!--实现我的账户和书架-->
        <div class="span6 padding-large-top text-right">
            <div class="button-group" th:if="${session.user} !=null">
                <button type="button" class="button text-main"><span class="icon-user"></span> <a th:href="@{/index/toAccount/}+${session.user.phone}">我的账户</a></button>
                <button type="button" class="button text-main"><span class="icon-shujia"></span><a th:href="@{/index/toBookshelf/}+${session.user.id}">我的书架</a> </button>
            </div>
            <div class="button-group" th:if="${session.user} ==null">
                <button type="button" class="button text-main"><span class="icon-user"></span> <a href="javascript:;">我的账户</a></button>
                <button type="button" class="button text-main"><span class="icon-shujia"></span><a href="javascript:;">我的书架</a> </button>
            </div>
        </div>

    </div>
</div>


<!--正文-->
<div class="container">
    <div class="row margin-top">
        <div class="span24">
            <ul class="nav nav-menu nav-inline nav-sub nav-big nav-navicon nav-justified border-dot">
                <li id="ctl00_c1_nav_lianzai" class="active"><a style="color: #5c5050" th:href="@{/}">在线读书</a></li>
                <li id="ctl00_c1_nav_meiwen"><a href="javascript:;">每日一读</a></li>
                <li id="ctl00_c1_nav_daohang"><a href="#">读书导航</a></li>
            </ul>
        </div>
    </div>
</div>

<!--显示文章信息-->
<div class="container margin-top">
    <div class="crumbs">
        当前位置： <a th:href="@{/}">首页</a><span class="icon-crumb"></span><a href="javascript:;">每日一读</a>
    </div>
</div>

<div class="container margin-top">
    <div class="news-left" style="width:100%;">
        <!--获取后台request的值-->
        <div class="content-read" style="display: none">
            <span class="content-read" th:text="${read.content}"></span>
        </div>

        <div class="article-detail" style="margin:10px 100px;">
            <!--每日一读标题栏信息-->
            <h1 style="text-align:center;" th:text="${read.name}"></h1>
            <div class="article-infos">
                <div class="article-info" style="text-align:center;">
                    <span style="margin:0;padding:0;" th:text="${read.author}" ></span>
                </div>
            </div>
            <!--每日一读内容-->
            <div class="text" style="font-size:16px;text-indent:34px;line-height: 32px;">


            </div>
            <blockquote class="margin-large bg-mix">
                <p>没时间读书？每日一读栏目，每天一篇经典美文，花几分钟时间阅读，积少成多，养成阅读习惯！专注、执着，每天阅读！</p>
            </blockquote>
            <div class="margin-top margin-large-bottom text-center"></div>
            <div class="margin-large-top margin-large-bottom text-center">
                <a class="button button-large bg-grey" th:href="@{/index/toRead}">随机文章</a>
            </div>
        </div>
    </div>
</div>

<div class="layout" id="footer">
    <div class="container padding">
        <div class="text-center">
            <ul class="nav nav-inline">
                <li><a href="1587.html">关于读书</a></li>
                <li><a href="1588.html">免责声明</a></li>
                <li><a href="1589.html">读书目录</a></li>
                <li><a href="1590.html">联系我们</a></li>
            </ul>
        </div>
        <div class="text-center height-big">Copyright © 读书网 www.dushu.com 2005-2020, All Rights Reserved.</div>
        <div class="text-center height-big"><a href="javascript:;">鄂ICP备15019699号</a> <img
                th:src="@{/picture/beian.png}" style="vertical-align:middle;margin-left:10px;"> 鄂公网安备
            42010302001612号
        </div>
    </div>
</div>

<script lang="javascript" type="text/javascript" th:src="@{/js/common.min-201706.js}"></script>

</body>
</html>
